<?php
$cs = Yii::app ()->clientScript;
// cs -> registerCoreScript('jquery');

$cs->registerCssFile ( '/css/player.css' );
$cs->registerScriptFile ( '/javascripts/jquery-ui-1.8.17.custom.min.js', CClientScript::POS_END );
$cs->registerScriptFile ( '/javascripts/player.js', CClientScript::POS_END );
?>
<div id="background"></div>

<div id="player">
	<div class="cover"></div>
	<div class="ctrl">
		<div class="tag">
			<strong>Title</strong> <span class="artist">Artist</span> <span
				class="album">Album</span>
		</div>
		<div class="control">
			<div class="left">
				<div class="rewind icon"></div>
				<div class="playback icon"></div>
				<div class="fastforward icon"></div>
			</div>
			<div class="volume right">
				<div class="mute icon left"></div>
				<div class="slider left">
					<div class="pace"></div>
				</div>
			</div>
		</div>
		<div class="progress">
			<div class="slider">
				<div class="loaded"></div>
				<div class="pace"></div>
			</div>
			<div class="timer left">0:00</div>
			<div class="right">
				<div class="repeat icon"></div>
				<div class="shuffle icon"></div>
			</div>
		</div>
	</div>
	<?php
	if (! $like_model || $like_model->isNewRecord) {
		$like_action = "like";
		$data = 'audio_id=' . $audio_model->audio_id . '&like=1';
	} else {
		$like_action = "liked";
		$data = 'audio_id=' . $audio_model->audio_id . '&like=0';
	}
	echo CHtml::ajaxLink ( $like_action, array ('/play/audio/like' ), array ('success' => 'function(){}', 'data' => $data, 'type' => 'POST' ), array ('confirm' => 'are u sure?','class'=>'btn' ) );
	?>
	
	<?php
	//添加收藏
	echo CHtml::ajaxLink ( 'add', array ('/play/audio/like' ), array ('success' => 'function(){}', 'data' => $data, 'type' => 'POST' ), array ('confirm' => 'are u sure?','class'=>'btn'));
	?>
	
	
</div>
<ul id="playlist"></ul>
<script>
	var mp3file = <?php echo $mp3file;?>
</script>
